{% extends 'base.html' %}
{% load mathfilters %}
{% block content %}


{{ calendar }}

{% if month_passed == '1' %}
    <div class="text-left">
        <a href='/calendar/{{ year_passed|sub:"1" }}/12'>Prev</a>
    </div>
    <div class="text-right">
            <a href='/calendar/{{ year_passed }}/2'>Next</a>
    </div>
{% elif month_passed == '12' %}
    <div class="text-left">
        <a href='/calendar/{{ year_passed }}/11'>Prev</a>
    </div>
    <div class="text-right">
            <a href='/calendar/{{ year_passed|add:1 }}/1'>Next</a>
    </div>
{% else %}
    <div class="text-left">
        <a href='/calendar/{{ year_passed }}/{{ month_passed|sub:"1" }}'>Prev</a>
    </div>
    <div class="text-right">
        <a href='/calendar/{{ year_passed }}/{{ month_passed|add:"1" }}'>Next</a>
    </div>
{% endif %}

{% endblock %}
